<template>
  <div id="app">
    <Header/>
    <router-view></router-view>
    <Footer v-show="$route.meta.footerShow"/>
  </div>
</template>

<script>
//引入组件
import Header from './components/Header'
import Footer from './components/Footer'
export default {
  name: 'App',
  components: {
    Header,
    Footer
  },
  mounted() {
    console.log('root mounted');
    //通知vuex发请求，获取数据，存储在仓库中
    this.$store.dispatch('categoryList');
  },
}
</script>

<style>
/* 轮播图样式, */
.swiper-button-prev,.swiper-button-next{
  color: red;
}
</style>
